﻿using System;
using System.Collections.Generic;
using System.Text;
using Watchdog.Dal;
using Watchdog.Bll;
using Watchdog.Bll.Base;

namespace Watchdog.Bll.Factory {

    public partial class AssemblyFileFactory {
        public static void Delete ( AssemblyFileBase assemblyfile ) {
            DataClient.Current.AssemblyFileDelete ( assemblyfile.IntData );
        }

        public static List<AssemblyFile> GetByDefinition ( int definition ) {
		    List<AssemblyFile> outlist = new List<AssemblyFile> ();
            Watchdog.Facade.AssemblyFile[] list = Dal.DataClient.Current.AssemblyFileGetByDefinition ( definition );
            foreach (Watchdog.Facade.AssemblyFile item in list)
                outlist.Add (new AssemblyFile (item));
            return outlist;
            // return DataClient.Current.AssemblyFileGetByDefinition ( definition );
        }
        public static AssemblyFile GetById ( int id ) {
            return new AssemblyFile (DataClient.Current.AssemblyFileGetById (id));
        }
				
        public static void Insert ( AssemblyFileBase assemblyfile ) {
            assemblyfile.IntData = DataClient.Current.AssemblyFileInsert ( assemblyfile.IntData );
        }
		
        public static void Update ( AssemblyFileBase assemblyfile ) {
            DataClient.Current.AssemblyFileUpdate ( assemblyfile.IntData );
        }
		
	}
}
